# Include this directory
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

# Enumerate source files
FILE(GLOB SRC_FILES *.cpp *.inl)
FILE(GLOB INC_FILES *.h)

SET(DEPENDENT_LIBS "")
SET(DEPENDENT_INCLUDES "")

# GeoGram
IF (GEOGRAM_FOUND)
    LIST(APPEND DEPENDENT_INCLUDES ${GEOGRAM_INCLUDE_DIR})
    LIST(APPEND DEPENDENT_LIBS ${GEOGRAM_LIBRARY})
    ADD_DEFINITIONS(-DWITH_GEOGRAM)
ENDIF (GEOGRAM_FOUND)

ADD_LIBRARY(lib_geogram_base SHARED ${SRC_FILES} ${INC_FILES})
TARGET_INCLUDE_DIRECTORIES(lib_geogram_base SYSTEM PRIVATE ${DEPENDENT_INCLUDES})
TARGET_LINK_LIBRARIES(lib_geogram_base ${DEPENDENT_LIBS})
